package com.wj.trans.controller;

import com.wj.trans.service.UserService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/user")
@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping(" ")
    public String registry(String userName, String password){
        Integer result = userService.insertUser(userName,password);
        log.info("数据输入成功,result:"+result);
        return "注册成功";
    }
}